package com.vizhuo.client.business.match.goods.vo;

import java.io.Serializable;

import com.vizhuo.client.base.AbstractVo;
import com.vizhuo.client.util.ClientUtil;

/**
 * 
 * @ClassName: MyOrder
 * @Description: 订单管理-配货记录model
 * @author TANDP
 * @date 2015-7-9 下午1:56:12
 * 
 */
public class MyOrder extends AbstractVo implements Serializable {

    /**
     * 货源id/要车信息id
     */
    private Long goodsId;

    /**
     * 货源编号/订单编号
     */
    private String goodsNo;

    /**
     * 发货人账号id
     */
    private Integer releaseAccountId;

    /**
     * 发货人账号类型
     */
    private String releaseAccountType;

    /**
     * 发货人姓名
     */
    private String releaseName;

    /**
     * 发货人手机号
     */
    private String releasePhone;

    /**
     * 起点-省(编码)
     */
    private String startProvice;

    /**
     * 起点-市(编码)
     */
    private String startCity;

    /**
     * 起点-区(编码)
     */
    private String startCounty;

    /**
     * 运输开始位置(省 市 区)拼接的中文
     */
    private String startAreaAddress;

    /**
     * 终点-省(编码)
     */
    private String endProvice;

    /**
     * 终点-市(编码)
     */
    private String endCity;

    /**
     * 终点-区(编码)
     */
    private String endCounty;

    /**
     * 运输结束位置(省 市 区)拼接的中文
     */
    private String endAreaAddress;

    /**
     * 抢单日期:yy月dd日
     */
    private String robDate;

    /**
     * 抢单时间:hh:mm
     */
    private String robTime;

    /**
     * 车辆类型
     */
    private String carType;

    /**
     * 车长
     */
    private String carLength;

    /**
     * 货物类型,重货,泡货
     */
    private String goodsType;

    /**
     * 货物类型-code
     */
    private String goodsTypeCode;//

    /**
     * 货物重量
     */
    private double goodsLoad;

    /**
     * 货物体积(方)
     */
    private double goodsSize;//

    /**
     * 件数
     */
    private Integer goodsPiece;

    /**
     * 用车描述
     */
    private String needDesc;

    /**
     * 是否已成交
     */
    private String isCarrier;

    /**
     * 信息部公司名称
     */
    private String infoName;

    /**
     * 货物种类 编码
     */
    private String goodsSpecies;

    /**
     * 货物种类 名称
     */
    private String goodsSpeciesName;

    /**
     * 用车时间
     */
    private String needCarTime;

    /**
     * 是否收藏,1:已收藏,0:未收藏-共用
     */
    private String isCollect;

    /**
     * 认证
     */
    private String checkFlag = "0";

    /**
     * 发货人公司名称
     */
    private String consignerShopName;

    /**
     * 货源状态 待到货确认 6 待评价 3
     */
    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getConsignerShopName() {
        return consignerShopName;
    }

    public void setConsignerShopName(String consignerShopName) {
        this.consignerShopName = consignerShopName;
    }

    public String getIsCollect() {
        return isCollect;
    }

    public void setIsCollect(String isCollect) {
        this.isCollect = isCollect;
    }

    public void setGoodsSpeciesName(String goodsSpeciesName) {
        this.goodsSpeciesName = goodsSpeciesName;
    }

    public String getReleaseName() {
        return releaseName == null ? "" : releaseName;
    }

    public void setReleaseName(String releaseName) {
        this.releaseName = releaseName;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getReleaseAccountId() {
        return releaseAccountId;
    }

    public void setReleaseAccountId(Integer releaseAccountId) {
        this.releaseAccountId = releaseAccountId;
    }

    public String getStartAreaAddress() {
        return startAreaAddress;
    }

    public void setStartAreaAddress(String startAreaAddress) {
        this.startAreaAddress = startAreaAddress;
    }

    public String getEndAreaAddress() {
        return endAreaAddress;
    }

    public void setEndAreaAddress(String endAreaAddress) {
        this.endAreaAddress = endAreaAddress;
    }

    public String getRobDate() {
        return robDate;
    }

    public void setRobDate(String robDate) {
        this.robDate = robDate;
    }

    public String getRobTime() {
        return robTime;
    }

    public void setRobTime(String robTime) {
        this.robTime = robTime;
    }

    public void setCarType(String carType) {
        this.carType = carType;
    }

    public void setCarLength(String carLength) {
        this.carLength = carLength;
    }

    public String getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(String goodsType) {
        this.goodsType = goodsType;
    }

    public double getGoodsLoad() {
        return goodsLoad;
    }

    public void setGoodsLoad(double goodsLoad) {
        this.goodsLoad = goodsLoad;
    }

    public String getNeedDesc() {
        return ClientUtil.str(needDesc);
    }

    public void setNeedDesc(String needDesc) {
        this.needDesc = needDesc;
    }

    public String getIsCarrier() {
        return isCarrier;
    }

    public void setIsCarrier(String isCarrier) {
        this.isCarrier = isCarrier;
    }

    public String getGoodsTypeCode() {
        return goodsTypeCode;
    }

    public void setGoodsTypeCode(String goodsTypeCode) {
        this.goodsTypeCode = goodsTypeCode;
    }

    public double getGoodsSize() {
        return goodsSize;
    }

    public void setGoodsSize(double goodsSize) {
        this.goodsSize = goodsSize;
    }

    public String getReleaseAccountType() {
        return releaseAccountType;
    }

    public void setReleaseAccountType(String releaseAccountType) {
        this.releaseAccountType = releaseAccountType;
    }

    public String getReleasePhone() {
        return releasePhone;
    }

    public void setReleasePhone(String releasePhone) {
        this.releasePhone = releasePhone;
    }

    public String getInfoName() {
        return infoName;
    }

    public void setInfoName(String infoName) {
        this.infoName = infoName;
    }

    /**
     * 客户端货物类型调用该方法:处理 重量和体积的问题
     * 
     * @return
     */
    public String getGoodsTypeLabel() {
        /*
         * String goodsTypeLabel = this.goodsSpeciesName == null ? "" :
         * this.goodsSpeciesName; String goodsLoadStr = ""; String goodsSizeStr
         * = ""; if (this.getGoodsLoad() == (int) this.getGoodsLoad()) {
         * goodsLoadStr = String.valueOf((int) this.getGoodsLoad()); } else {
         * goodsLoadStr = String.valueOf(this.getGoodsLoad()); } if
         * (this.getGoodsSize() == (int) this.getGoodsSize()) { goodsSizeStr =
         * String.valueOf((int) this.getGoodsSize()); } else { goodsSizeStr =
         * String.valueOf(this.getGoodsSize()); }
         * 
         * if ("1".equals(this.getGoodsTypeCode())) { goodsTypeLabel += " " +
         * goodsLoadStr + "吨"; } else { goodsTypeLabel += " " + goodsSizeStr +
         * "立方"; } return goodsTypeLabel;
         */

        String goodsSpeciesLabelStr = this.goodsSpeciesName == null ? "" : this.goodsSpeciesName;

        String goodsLoadStr = "";
        String goodsSizeStr = "";

        if (this.getGoodsLoad() == (int) this.getGoodsLoad()) {
            goodsLoadStr = String.valueOf((int) this.getGoodsLoad());
        } else {
            goodsLoadStr = String.valueOf(this.getGoodsLoad());
        }
        if (this.getGoodsSize() == (int) this.getGoodsSize()) {
            goodsSizeStr = String.valueOf((int) this.getGoodsSize());
        } else {
            goodsSizeStr = String.valueOf(this.getGoodsSize());
        }
        if (this.goodsLoad != 0.0) {
            goodsSpeciesLabelStr = goodsSpeciesLabelStr + " " + goodsLoadStr + "吨";
        }
        if (this.goodsSize != 0.0) {
            goodsSpeciesLabelStr = goodsSpeciesLabelStr + " " + goodsSizeStr + "立方";
        }
        if (goodsPiece != null && this.goodsPiece != 0) {
            goodsSpeciesLabelStr = goodsSpeciesLabelStr + " " + goodsPiece + "件";
        }
        return goodsSpeciesLabelStr;
    }

    /**
     * 车长(没有带单位)
     * 
     * @return
     */
    public String getCarLength() {
        return carLength;
    }

    /**
     * 车型,平板车
     * 
     * @return
     */
    public String getCarType() {
        return carType;
    }

    /**
     * 用车时间
     * 
     * @return
     */
    public String getNeedCarTime() {
        return needCarTime;
    }

    public void setNeedCarTime(String needCarTime) {
        this.needCarTime = needCarTime;
    }

    public String getCheckFlag() {
        return checkFlag;
    }

    public void setCheckFlag(String checkFlag) {
        this.checkFlag = checkFlag;
    }

    public String getGoodsSpeciesName() {
        return goodsSpeciesName;
    }

    public String getGoodsSpecies() {
        return goodsSpecies;
    }

    public void setGoodsSpecies(String goodsSpecies) {
        this.goodsSpecies = goodsSpecies;
    }

    public String getStartProvice() {
        return startProvice;
    }

    public void setStartProvice(String startProvice) {
        this.startProvice = startProvice;
    }

    public String getStartCity() {
        return startCity;
    }

    public void setStartCity(String startCity) {
        this.startCity = startCity;
    }

    public String getStartCounty() {
        return startCounty;
    }

    public void setStartCounty(String startCounty) {
        this.startCounty = startCounty;
    }

    public String getEndProvice() {
        return endProvice;
    }

    public void setEndProvice(String endProvice) {
        this.endProvice = endProvice;
    }

    public String getEndCity() {
        return endCity;
    }

    public void setEndCity(String endCity) {
        this.endCity = endCity;
    }

    public String getEndCounty() {
        return endCounty;
    }

    public void setEndCounty(String endCounty) {
        this.endCounty = endCounty;
    }

    public String getGoodsNo() {
        return goodsNo;
    }

    public void setGoodsNo(String goodsNo) {
        this.goodsNo = goodsNo;
    }

    public Integer getGoodsPiece() {
        return goodsPiece;
    }

    public void setGoodsPiece(Integer goodsPiece) {
        this.goodsPiece = goodsPiece;
    }

}
